package com.xmkj.winmoney.mine.adapter;

import android.content.Context;

import com.common.retrofit.entity.bean.WashCarRecordBean;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.winmoney.R;

import java.util.List;

/**
 * Created by chen on 2018/3/31.
 */

public class UserCarDetailsAdapter extends CommonAdapter<WashCarRecordBean.ListsBean> {
    public UserCarDetailsAdapter(Context context, List<WashCarRecordBean.ListsBean> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, WashCarRecordBean.ListsBean item, int position) {
            holder.setText(R.id.tv_car_name,item.brand+" "+item.model+" "+item.carnum);
            holder.setText(R.id.tv_wash_money,item.total);
            holder.setText(R.id.tv_date,item.create_time);
    }

    @Override
    protected int getItemViewLayoutId(int position, WashCarRecordBean.ListsBean item) {
        return R.layout.item_user_car_details;
    }
}
